MATLAB draw plot Posted on 2022-06-16 | In programming language , MATLAB 12345678910111213141516171819202122232425262728293031323334353637383940% Set some nice settings.grid on;format long;% Hold the graphics output until we are good to go.hold all;% To create some random test data.x1 = 100 : 100 : 1000;raw_y1 = [0.76,0.79,0.80,0.80,0.81,0.82,0.82,0.82,0.82,0.81];raw_y2 = [0.85,0.81,0.83,0.83,0.82,0.79,0.78,0.80,0.82,0.82];raw_y3 = [0.85,0.84,0.83,0.83,0.83,0.83,0.82,0.82,0.82,0.82];legendText = cell(0);plot(x1,y1,'--go','MarkerSize',5, 'MarkerFaceColor','g', 'LineWidth',3);legendText(end+1) = { 'CUB' };plot(x1,y2,':bo', 'MarkerSize',5, 'MarkerFaceColor','b', 'LineWidth',3);legendText(end+1) = { 'SUN' };plot(x1,y3,'-ro', 'MarkerSize',5, 'MarkerFaceColor','r', 'LineWidth',3);legendText(end+1) = { 'Dogs' };xlim([100 1000]);ylim([0.72 0.90]);set(gca,'fontsize',15)% set sticks on x and y axisget(gca, 'xtick');set(gca, 'xtick', 100:100:1000);get(gca, 'ytick');set(gca, 'ytick', 0.72:0.02:0.90);xlabel('# web training instances per category');ylabel('Accuracy');legend(legendText,'location','southeast');hold off;